/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import dao.FamiliaDAO;
import dao.FamiliaMateriaPrimaDAO;
import dao.MateriaPrimaDAO;
import dao.ProdutoDAO;
import dao.ProdutoMateriaPrimaDAO;
import java.awt.Color;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.table.DefaultTableModel;
import model.Familia;
import model.FamiliaCombo;
import model.FamiliaMateriaPrima;
import model.MateriaPrima;
import model.Produto;
import model.ProdutoMateriaPrima;
import model.Usuario;
import sisgp.AutoNumber;
import sisgp.SisMsg;
import sisgp.SisCodificacao;

/**
 *
 * @author Fran
 */



public class frmManutencaoProduto extends javax.swing.JFrame {

    /**
     * Creates new form frmManutencaoProduto
     */
    public frmManutencaoProduto() {
        initComponents();
        setLocationRelativeTo( null );
        
    }
    
    public static int respostaConfirmacao;
    public int modo;
    
    public List<FamiliaMateriaPrima> ListafamliaMateria;

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        txtDescricaoProduto = new javax.swing.JTextField();
        btnCancelarProduto = new javax.swing.JButton();
        btnConfirmarProduto = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        cboFamilia1 = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        cboMateriaPrimaPredominante = new javax.swing.JComboBox();
        btnBuscarCor = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        txtCor = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        painel_cor = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        txtDimensaoP = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        txtQtdP = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        btnCancelarProduto1 = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblMateriasPrimasProdutos = new javax.swing.JTable();
        jLabel8 = new javax.swing.JLabel();
        cboMateriaPrimaProduto = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        txtQuantidade = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        txtDimensoesM = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        btnAdd1 = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        txtCorMateria = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        cboNivel = new javax.swing.JComboBox();
        txtCorCor = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Manutenção de Produtos");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jTabbedPane1.setBackground(new java.awt.Color(255, 255, 255));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel2.setText("Descrição do Produto:");

        txtDescricaoProduto.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        txtDescricaoProduto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDescricaoProdutoActionPerformed(evt);
            }
        });

        btnCancelarProduto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/back.png"))); // NOI18N
        btnCancelarProduto.setText("Cancelar");

        btnConfirmarProduto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/check.png"))); // NOI18N
        btnConfirmarProduto.setText("Avançar");
        btnConfirmarProduto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConfirmarProdutoActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel3.setText("Família:");

        cboFamilia1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        cboFamilia1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cboFamilia1ItemStateChanged(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel5.setText("Matéria-Prima:");

        cboMateriaPrimaPredominante.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        btnBuscarCor.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        btnBuscarCor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/prompt.png"))); // NOI18N
        btnBuscarCor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarCorActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel6.setText("Cor:");

        txtCor.setEditable(false);
        txtCor.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel1.setFont(new java.awt.Font("sansserif", 3, 18)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 153, 51));
        jLabel1.setText("Passo 01: Codificação do Novo Produto");

        javax.swing.GroupLayout painel_corLayout = new javax.swing.GroupLayout(painel_cor);
        painel_cor.setLayout(painel_corLayout);
        painel_corLayout.setHorizontalGroup(
            painel_corLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 61, Short.MAX_VALUE)
        );
        painel_corLayout.setVerticalGroup(
            painel_corLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 28, Short.MAX_VALUE)
        );

        jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/units-128.png"))); // NOI18N

        txtDimensaoP.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel15.setText("Dimensão");

        txtQtdP.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel16.setText("Quantidade");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnConfirmarProduto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCancelarProduto)
                .addGap(11, 11, 11))
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(217, 217, 217)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(cboFamilia1, javax.swing.GroupLayout.PREFERRED_SIZE, 437, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel5)
                                            .addComponent(cboMateriaPrimaPredominante, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(18, 18, 18)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel15)
                                            .addComponent(jLabel16)
                                            .addComponent(txtDimensaoP, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                                            .addComponent(txtQtdP))))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
                                .addComponent(jLabel11))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtDescricaoProduto, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel6)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                                .addComponent(txtCor, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(btnBuscarCor, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(painel_cor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(0, 189, Short.MAX_VALUE))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(383, 383, 383)
                        .addComponent(jLabel1)))
                .addGap(62, 62, 62))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGap(71, 71, 71)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboFamilia1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addGap(8, 8, 8)
                                .addComponent(cboMateriaPrimaPredominante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtDimensaoP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jLabel11))
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(painel_cor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBuscarCor)
                            .addComponent(txtCor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(23, 23, 23)
                        .addComponent(jLabel2))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtQtdP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtDescricaoProduto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 224, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCancelarProduto)
                    .addComponent(btnConfirmarProduto))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Passo 01", jPanel1);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        btnCancelarProduto1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/back.png"))); // NOI18N
        btnCancelarProduto1.setText("Voltar");
        btnCancelarProduto1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarProduto1ActionPerformed(evt);
            }
        });

        jLabel7.setText("Família:");

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Matérias-Primas do Produto"));

        tblMateriasPrimasProdutos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Nível", "Matéria Prima", "Quantidade", "Dimensões"
            }
        ));
        jScrollPane1.setViewportView(tblMateriasPrimasProdutos);

        jLabel8.setText("Matéria-Prima:");

        cboMateriaPrimaProduto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel9.setText("Dimensões:");

        jLabel10.setText("Quantidade:");

        jLabel12.setText("Nível:");

        btnAdd1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/check.png"))); // NOI18N
        btnAdd1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdd1ActionPerformed(evt);
            }
        });

        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/cancel.png"))); // NOI18N

        txtCorMateria.setEditable(false);

        jLabel17.setText("Cor:");

        jButton1.setText(">");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        cboNivel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtCorCor.setEditable(false);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1056, Short.MAX_VALUE)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(25, 25, 25)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(jLabel8)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cboMateriaPrimaProduto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGap(195, 195, 195))
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(jLabel12)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel9)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtDimensoesM, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(32, 32, 32)
                                        .addComponent(jLabel10)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(28, 28, 28)
                                        .addComponent(jLabel17)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtCorMateria, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jButton1)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtCorCor, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(169, 169, 169))))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnAdd1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnExcluir)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(cboMateriaPrimaProduto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnAdd1)
                            .addComponent(btnExcluir))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtCorMateria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel5Layout.createSequentialGroup()
                                    .addGap(3, 3, 3)
                                    .addComponent(jLabel17))
                                .addGroup(javax.swing.GroupLayout.Alignment.CENTER, jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jButton1)
                                    .addComponent(txtCorCor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(txtQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(3, 3, 3)
                                .addComponent(jLabel9))
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtDimensoesM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel10)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)))
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(55, 55, 55)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(cboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel13.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel13.setText("GXTHFF998701");

        jLabel4.setFont(new java.awt.Font("sansserif", 3, 18)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(0, 153, 51));
        jLabel4.setText("Passo 02: Estrutura do Produto");

        jLabel14.setText("Familia");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnCancelarProduto1))
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel14)
                        .addGap(306, 306, 306)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(68, 68, 68)
                                .addComponent(jLabel13)
                                .addGap(70, 70, 70))
                            .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jLabel4)
                .addGap(20, 20, 20)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel13)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCancelarProduto1))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Passo 02", jPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );

        jTabbedPane1.getAccessibleContext().setAccessibleName("Passo 01");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnConfirmarProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConfirmarProdutoActionPerformed

      if(cboFamilia1.getSelectedIndex() == 0 || cboMateriaPrimaPredominante.getSelectedIndex() == 0 || txtCor.getText().trim().equals("") || txtDescricaoProduto.getText().trim().equals("") || txtDimensaoP.getText().trim().equals("") || txtQtdP.getText().trim().equals("")){
          
          msg.Erro("Todos as informações devem ser preenchidas!", "Atenção");
          
      }
      else
      {
          
        FamiliaMateriaPrima fammate   = ListafamliaMateria.get(cboMateriaPrimaPredominante.getSelectedIndex()-1);
        Familia fam                   = sisgp.SisStorer.ColFamiliaCodificacao.get(cboFamilia1.getSelectedIndex()-1);
        
        MateriaPrima mate = new MateriaPrima();
        
        SisCodificacao codifica = new SisCodificacao();
        
        mate = fammate.getMateriaPrima();
        
        String codigoProduto = codifica.geraCodificacao(fam, mate, sisgp.SisStorer.cor_hex);
        String descProduto = txtDescricaoProduto.getText().trim();
        String dimensao = txtDimensaoP.getText().trim();
        Double quantidade = Double.parseDouble(txtQtdP.getText().trim());
        
        frmConfirmacaoProduto  frmConfirmaProd = new frmConfirmacaoProduto(null, true);
        
        frmConfirmaProd.codigoProduto = codigoProduto;
        frmConfirmaProd.descricaoProduto = descProduto;
        
        
        frmConfirmaProd.setVisible(true);
        
        if(respostaConfirmacao == 1){
            
            Produto prd = new Produto();
            
            prd.setCodigo(codigoProduto);
            prd.setDescricao(descProduto);
            prd.setFamilia(fam);
            
            prdDAO.inserir(prd);
            
            ProdutoMateriaPrima pmp = new ProdutoMateriaPrima();
            
            int codigo = autonumber.getSequencial(codigoProduto);
            
            pmp.setCodigo(modo);
            pmp.setCor(sisgp.SisStorer.cor_hex);
            pmp.setDimensao(dimensao);
            pmp.setMateriaprima(mate);
            pmp.setNivel("0");
            pmp.setProduto(prd);
            pmp.setQuantidade(quantidade);
            pmp.setPai(1);
            pmp.setTipo(1);
            
            pmpDAO.inserir(pmp);
            
            jLabel13.setText(codigoProduto);
            
            sisgp.SisStorer.familiaProduto = fam;
            sisgp.SisStorer.produto = prd;
            
            carregaComboMateriaPasso2();
            carregaComboNivel();
            carregaGrid();
            
            jTabbedPane1.setSelectedIndex(1);
            
            jTabbedPane1.setEnabledAt(0, false);
            
        }
        else{
         
        }
          
      }
           
    }//GEN-LAST:event_btnConfirmarProdutoActionPerformed

    private void btnBuscarCorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarCorActionPerformed

        //frmSelecionarCor frmSelectCor = new frmSelecionarCor();
        //frmSelectCor.setVisible(true);
        
        frmSelCor cor =new frmSelCor(null,true);
        cor.setVisible(true);
        
        txtCor.setText("#"+sisgp.SisStorer.cor_hex);
        painel_cor.setBackground(sisgp.SisStorer.cor_color);
        
    }//GEN-LAST:event_btnBuscarCorActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        
        if (modo == 1){
            jTabbedPane1.setEnabledAt(1, false);
            carregaComboFamilia1();
        } else{
            
            jTabbedPane1.setEnabledAt(0, false);
            
        }
        
        
    }//GEN-LAST:event_formWindowOpened

    private void cboFamilia1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboFamilia1ItemStateChanged
        
        FamiliaMateriaPrimaDAO fammatDAO = new FamiliaMateriaPrimaDAO();
        
        int indice = cboFamilia1.getSelectedIndex();
        
        List<Familia> listafamilia = sisgp.SisStorer.ColFamiliaCodificacao;
        
        int codigo = listafamilia.get(indice-1).getCodigo();
        
        List<FamiliaMateriaPrima> fammat = fammatDAO.findMatPrimadaFamilia(codigo);
        
        DefaultComboBoxModel materias_combo = new DefaultComboBoxModel();
        
        materias_combo.addElement("Selecione...");
        
        for(FamiliaMateriaPrima fmp : fammat){
            materias_combo.addElement(fmp.getMateriaPrima().getDescricao());
        }
        
        cboMateriaPrimaPredominante.setModel(materias_combo);

        cboMateriaPrimaPredominante.setSelectedIndex(0);
        
        ListafamliaMateria = fammat;

    }//GEN-LAST:event_cboFamilia1ItemStateChanged

    private void txtDescricaoProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDescricaoProdutoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDescricaoProdutoActionPerformed

    private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated
        

        
    }//GEN-LAST:event_formWindowActivated

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        
        frmSelCor cor =new frmSelCor(null,true);
        cor.setVisible(true);
        
        txtCorMateria.setText("#"+sisgp.SisStorer.cor_hex);
        txtCorCor.setBackground(sisgp.SisStorer.cor_color);
        painel_cor.setBackground(sisgp.SisStorer.cor_color);
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnAdd1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdd1ActionPerformed
        
        
        if(cboMateriaPrimaProduto.getSelectedIndex() == 0 || cboNivel.getSelectedIndex() == 0 || txtDimensoesM.getText().trim().equals("") || txtQuantidade.getText().trim().equals("") || txtCorMateria.getText().trim().equals("")){
            
            msg.Erro("Todos as informações devem ser preenchidas!", "Atenção");
            
        }
        else{
            
            SisCodificacao retornaNivel = new SisCodificacao();
            
            int materiaSelecionada = cboMateriaPrimaProduto.getSelectedIndex()-1;
            int nivelselecionado = cboNivel.getSelectedIndex()-1;
            String dimensaoItem = txtDimensoesM.getText().trim();
            Double quantidadeItem = Double.parseDouble(txtQuantidade.getText().trim());
            String cor_hex = sisgp.SisStorer.cor_hex;
            
            
            
            MateriaPrima matpriSel = daomat.findById(comboFamMatPriPasso2.get(materiaSelecionada).getMateriaPrima().getCodigo());
            
            //msg.Info("nivel selecionado - " +MatPrimaProduto.get(nivelselecionado).getNivel(), "insercao");
            
            ProdutoMateriaPrima pmpNivelSel = MatPrimaProduto.get(nivelselecionado);
            
            String nivel = retornaNivel.getNivel(pmpNivelSel); //busca a qual nivel pertencera
            
            ProdutoMateriaPrima item = new ProdutoMateriaPrima();
            item.setCodigo(autonumber.getSequencial(sisgp.SisStorer.produto.getCodigo()));
            item.setCor(cor_hex);
            item.setDimensao(dimensaoItem);
            item.setMateriaprima(matpriSel);
            item.setNivel(nivel);
            item.setPai(pmpNivelSel.getCodigo());
            item.setProduto(sisgp.SisStorer.produto);
            item.setQuantidade(quantidadeItem);
            item.setTipo(2);
            
            pmpDAO.inserir(item);
            
            msg.Info("Matéria Prima adicionada com sucesso!", "Atenção");
            
            carregaComboNivel();
            carregaGrid();
            
            cboNivel.setSelectedIndex(0);
            txtDimensoesM.setText("");
            txtQuantidade.setText("");
            txtCorMateria.setText("");
            txtCorCor.setBackground(Color.WHITE);
            
        }
         
    }//GEN-LAST:event_btnAdd1ActionPerformed

    private void btnCancelarProduto1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarProduto1ActionPerformed
        dispose();
    }//GEN-LAST:event_btnCancelarProduto1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmManutencaoProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmManutencaoProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmManutencaoProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmManutencaoProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new frmManutencaoProduto().setVisible(true);
            }
        });
    }
    
    private void carregaComboFamilia1()
    {
        //List<FamiliaCombo> cFamlia1 = null;
        List<Familia> dadosfam = dao.findAll();
        
        sisgp.SisStorer.ColFamiliaCodificacao = dadosfam;
        
        DefaultComboBoxModel familias_combo = new DefaultComboBoxModel();
        
        familias_combo.addElement("Selecione...");
        
        for(Familia f : dadosfam){
            familias_combo.addElement(""+f.getDescricao());
        }
 
        cboFamilia1.setModel(familias_combo);
        cboFamilia1.setSelectedIndex(0);
        
    }
    
    public void carregaComboMateriaPasso2(){
        
        Familia familia = new Familia();
        
        familia = sisgp.SisStorer.familiaProduto;
        
        List<FamiliaMateriaPrima> materiasPrimaComboPasso2 = fmpDAO.findMatPrimadaFamilia(familia.getCodigo());
        
        comboFamMatPriPasso2 = materiasPrimaComboPasso2;
        
        DefaultComboBoxModel combo = new DefaultComboBoxModel();
        
        combo.addElement("Selecione...");
        
        for(FamiliaMateriaPrima f : materiasPrimaComboPasso2){
            
            combo.addElement(f.getMateriaPrima().getDescricao());
            
        }
        
        cboMateriaPrimaProduto.setModel(combo);
        
    }
    
    public void carregaComboNivel(){
        
        
        MatPrimaProduto = pmpDAO.findMatPrimadoProdutoOrdenadoNivel(sisgp.SisStorer.produto.getCodigo());
        
        DefaultComboBoxModel combonivel = new DefaultComboBoxModel();
        combonivel.addElement("Selecione...");
        
        for(ProdutoMateriaPrima pmpnivel : MatPrimaProduto){
            
            combonivel.addElement(pmpnivel.getNivel());
            
        }
        
        cboNivel.setModel(combonivel);
        
    }
    
    public void carregaGrid(){
        
        DefaultTableModel dados = (DefaultTableModel) tblMateriasPrimasProdutos.getModel();
        
        dados.setNumRows(0);
        
        for(ProdutoMateriaPrima pmpnivel : MatPrimaProduto){
            
            dados.addRow(new String[] {
                ""+pmpnivel.getNivel(),
                ""+pmpnivel.getMateriaprima().getDescricao(),
                ""+pmpnivel.getQuantidade(),
                ""+pmpnivel.getDimensao()
            });
            
        }
        
        tblMateriasPrimasProdutos.setModel(dados);
        
    }
    
    FamiliaDAO dao = new FamiliaDAO();
    MateriaPrimaDAO daomat = new MateriaPrimaDAO();
    FamiliaMateriaPrimaDAO fmpDAO = new FamiliaMateriaPrimaDAO();
    ProdutoDAO  prdDAO = new ProdutoDAO();
    ProdutoMateriaPrimaDAO pmpDAO = new ProdutoMateriaPrimaDAO();
    SisMsg msg = new SisMsg();
    AutoNumber autonumber = new AutoNumber();

    public List<FamiliaMateriaPrima> comboFamMatPriPasso2;
    public List<ProdutoMateriaPrima> MatPrimaProduto;
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdd1;
    private javax.swing.JButton btnBuscarCor;
    private javax.swing.JButton btnCancelarProduto;
    private javax.swing.JButton btnCancelarProduto1;
    private javax.swing.JButton btnConfirmarProduto;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JComboBox cboFamilia1;
    private javax.swing.JComboBox cboMateriaPrimaPredominante;
    private javax.swing.JComboBox cboMateriaPrimaProduto;
    private javax.swing.JComboBox cboNivel;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JPanel painel_cor;
    private javax.swing.JTable tblMateriasPrimasProdutos;
    private javax.swing.JTextField txtCor;
    private javax.swing.JTextField txtCorCor;
    private javax.swing.JTextField txtCorMateria;
    private javax.swing.JTextField txtDescricaoProduto;
    private javax.swing.JTextField txtDimensaoP;
    private javax.swing.JTextField txtDimensoesM;
    private javax.swing.JTextField txtQtdP;
    private javax.swing.JTextField txtQuantidade;
    // End of variables declaration//GEN-END:variables
}
